package com.example.patient.jpa;

import com.example.common.entity.RxInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

/**
 * @Author wxy
 * @Date 2021/1/22 9:49
 * @Version 1.0
 */
public interface RxInfoRepository extends JpaRepository<RxInfo, String> {

    
    @Query(value = "select * from order_rx_info where rx_order_no_nvarchar in (:RxOrderNOs) and drug_type_nvarchar = '1'",nativeQuery = true)
    List<RxInfo> findByDrugType(@Param("RxOrderNOs") List<String> RxOrderNOs);
}
